package com.leyou.user.client;

import com.leyou.user.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * User: ycs
 * Date: 2020/8/30
 * Time: 16:18
 *
 * @author: ycs
 * Description: No Description
 */
@FeignClient("user-service")
public interface UserClient {
    /**
     * 根据用户名与密码查询用户
     * @param username
     * @param password
     * @return
     */
    @GetMapping("/query")
    public User findByUsernameAndPassword(
            @RequestParam("username") String username,
            @RequestParam("password")String password
    );
}
